cmake_minimum_required(VERSION 3.0.2)
project(local_planner)

add_compile_options(-std=c++11)

find_package(PCL REQUIRED)
find_package(Eigen3 REQUIRED)

find_package(catkin REQUIRED COMPONENTS
  pcl_ros
  quad_msgs
  roscpp
  trajectory_optimization
  transform_utils
  sensor_msgs
  nav_msgs
  tf
)

catkin_package()

include_directories(
  include
  ${catkin_INCLUDE_DIRS}
  ${PCL_INCLUDE_DIRS}
  ${EIGEN3_INCLUDE_DIRS}
)

add_library(collision_checker src/collision_checker.cpp)
target_link_libraries(collision_checker
  ${PCL_LIBRARIES}
)

add_library(local_planner src/local_planner.cpp)
target_link_libraries(local_planner
  ${catkin_LIBRARIES}
  ${PCL_LIBRARIES}
  collision_checker
)

add_executable(local_planner_node src/local_planner_node.cpp)
target_link_libraries(local_planner_node
  ${catkin_LIBRARIES}
  local_planner
)
